An iterative method of Huffman coding and decoding of color image data in the Lab color space where the coder loads a plurality of L coded words into a first buffer, loads a and b code words into second and third buffers, and then proceeds to decode L, a and b code words using two decoders in parallel to double the speed of the decoder.
Huffman coders assign the shortest codes to the most frequently used numbers. For example, the code for a common digital number, such as "512", would most likely be a smaller number than for a relatively rare number, like "511". This results in more compact coding, but time is required to code and uncode the data and system throughput may become limited.
The problem is more difficult in the decoder than in the encoder since the decoder can not pipeline the process. That is, in the coder the consecutive code words can be created in a pipeline since the input data words are of a standard length, and therefore the coder knows prior to coding exactly where each input data word starts and ends. However, since the coded words are of variable length, the decoder does not know where the next code word starts until the current one is decoded. More specifically, decoding a Huffman code word is a two clock process. On the first clock a relatively large word of input data in a register is inspected to determine the number of leading bits that constitute the current code word and that number of bits are output to a look up table decoder. On the second clock, that number of new bits are shifted in to refill the register for the next clock. A system which allows the decoder to produce an output on every clock pulse would be advantageous.
A second difficulty arises when the input data is a color image and is described using the Lab color space. The characteristics of the L terms are different from the a and b terms and require that the L term is sent to a different decoder from that used for the a and b terms. Ultimately, the requirement is for a decoder that can decode L, a and b terms on a word per clock basis. Various types of Huffman coding and decoding processes have been published, but do not disclose this invention.
U.S. Pat. No. 5,386,213 (Haupt et al.) discloses a coder and decoder apparatus for a data transmission system. The variable length coded data is arranged in blocks having a predetermined average length. Blocks which are not full are filled with data from other blocks.
U.S. Pat. No. 5,239,308 (Kessen) discloses a method of processing coded digital signals which are segmented into variable words. The variable length words are allocated to fixed length blocks. The fixed length blocks having a word length shorter than the predetermined word length are filled up with portions of variable length words having a word length longer than the predetermined word length.
U.S. Pat. No. 5,140,322 (Sakagami) discloses a method of transmitting variable word length coded data. The variable length code words are connected until a predetermined number of bits have been connected. The connected data can then be transmitted.
U.S. Pat. Nos. 5,379,116 (Wada et al.) and 4,963,867 (Bertrand) disclose methods of packing variable length coded data into fixed length packets.